import Login from '@/pages/Login'
import {createBrowserRouter} from 'react-router-dom'
import AuthRouter from "@/components/AuthRouter";
import GeekLayout from "@/pages/Layout";
import Home from "@/pages/Layout/Home";
import Article from "src/pages/Layout/Article";
import Publish from "@/pages/Layout/Publish";

const router = new createBrowserRouter([
    {
        path: '/',
        element: <AuthRouter><GeekLayout/></AuthRouter>,
        children: [
            {
            // path: '/home',
            index:true,
            element: <Home/>
            },
            {
            path: '/publish',
            element: <Publish/>
            },
            {
            path: '/article',
            element: <Article/>
            }
        ]

    },
    {
        path: '/login',
        element: <Login/>,
    },
])

export default router